ns="arm-monthly-semi-manufactured-product-reporter!";
function addDataLine(code,name,localin,localout,waster,increment,willed,remark) {
	var namePrefix = "bean.armItems["+(++itemIndex)+"].";
    var datas  = [
        {
      	  "type":"text",
      	  "attrs":{
      		"value":code
      	   },
      	   "className":"code-field"
        },
        {
      	  "type":"text",
      	  "attrs":{
      		  "value":name
      	  },
     	   "className":"code-field"        	  
        },
        {
      	  "type":"text",
      	  "attrs":{
      		  "name":namePrefix+"dataItems['Localin'].atomValue",
      		  "value":localin
      	  },
      	  "className":"number-field"
        },
        {
      	  "type":"label",
      	  "attrs":{
      		  "text":0
      	  }        	  
        },
        {
      	  "type":"text",
      	  "attrs":{
      		  "name":namePrefix+"dataItems['Localout'].atomValue",
      		  "value":localout
      	  },
      	  "className":"number-field"        	  
        },
        {
      	  "type":"label",
      	  "attrs":{
      		  "text":0
      	  }        	  
        },
        {
      	  "type":"text",
      	  "attrs":{
      		  "name":namePrefix+"dataItems['Waster'].atomValue",
      		  "value":waster
      	  },
      	  "className":"number-field"        	  
        },                   
        {
      	  "type":"label",
      	  "attrs":{
      		  "text":0
      	  }        	  
        },   
        {
        	"type":"text",
        	"attrs":{
        		"name":namePrefix+"dataItems['Increment'].atomValue",
        		"value":increment
        	},
        	  "className":"number-field"        	  
        },                   
        {
        	"type":"label",
        	"attrs":{
        		"text":0
        	}        	  
        },   
        {
        	"type":"text",
        	"attrs":{
        		"name":namePrefix+"dataItems['Willed'].atomValue",
        		"value":willed    	
             },
         	 "className":"number-field"
        
        },   
        {
      	  "type":"text",
      	  "attrs":{
      		  "name":namePrefix+"remark",
      		  "value":remark
      	  },
      	  "className":"code-field"        	  
        },
        {
      	  "type":"img",
      	  "attrs":{
               "src":sbase+"images/removeme.gif"
      	  },
      	  "csses":{
      		  "cursor":"hand"
      	  },
      	  "events":{
      		  "click":function(){
      			  if(!confirm("确认删除?"))return;
      			  $(this).parent().parent().remove();
      		  }
      	  }
        }                   
    ];
    
    addDataItem(datas,pdtBody); 
}
function showAddDialog(){
	window.showModalDialog("../../reporter/semi/select-product",window);
}